import request from '@/config/request.js'

/**
 * 获取产品列表
 * @param {Object} data
 * @property {string} client_id 客户ID
 * @property {number} project_number 项目ID
 * @property {number} status 产品状态 0-待确认 1-确认 2-生产中 3-生产完成 4-质检 5-入库 6-出库
 * @property {number} pageSize 分页大小
 * @property {number} page 页码
 *
 * @returns
 */
export const getProductList = (data) =>
  request.post('/wec/wk/getSalesOrderListReqToWx', data, { custom: { auth: true } })

/**获取产品的流程信息 */
export const getProductFlow = (params) =>
  request.get('/wec/pro/getProjectDetailToWx', params, { custom: { auth: true } })

/**发送邮箱并更新用户在ERP的邮箱
 * @param {Object} params
 * @property {string} email 邮箱地址
 * @property {number} id 客户ID
 * @property {string} cc_email 抄送人邮箱
 */
export const sendEmail = (params) =>
  request.post('/wec/customer/setEmail', params, { custom: { auth: true } })
